package com.b0;

public class Constructor {
    private String no;
    private String name;

//    即使我们不编写构造函数，系统会自动添加一个空参数，空函数体的构造函数
    public Constructor(String no,String name){
        this.no=no;
        this.name=name;
    }
    public void display() {
        System.out.println(no + name);
    }
}
class Test{
    public static void main(String[] args) {
        Constructor s = new Constructor("1001", "Rocket");
        s.display();
    }
}
